package com.yixun.qfbao.model.enums;

public enum TimeUnitTypeEnum {

    DAY("1", "天"),
    HOUR("2", "小时"),
    MINUT("3", "分钟"),
    NONE("4", "不需要"),
    EXTEND_05("5", "无期限");

    public static String getDescByNo(String no) {
        for (TimeUnitTypeEnum timeUnitTypeEnum : TimeUnitTypeEnum.values()) {
            if(no.equals(timeUnitTypeEnum.getNo())) {
                return timeUnitTypeEnum.getDesc();
            }
        }
        return null;
    }

    TimeUnitTypeEnum (String no, String desc) {
        this.no = no;
        this.desc = desc;
    }

    private String no;

    private String desc;

    public String getNo() {
        return no;
    }

    public String getDesc() {
        return desc;
    }
}
